package com.nbsaas.boot.evaluate.rest.convert;

import com.nbsaas.boot.entity.evaluate.EvaluateFile;
import com.nbsaas.boot.evaluate.api.domain.simple.EvaluateFileSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 评价文件-列表对象转换器
*/

public class EvaluateFileSimpleConvert implements Converter<EvaluateFileSimple, EvaluateFile> {




@Override
public EvaluateFileSimple convert(EvaluateFile source) {
    EvaluateFileSimple result = new EvaluateFileSimple();

                result.setId(source.getId());

               try {
                   if(source.getEvaluate()!=null){
                       result.setEvaluate(source.getEvaluate().getId());
                   }
                } catch (Exception ignored) { }

                result.setUrl(source.getUrl());


    return result;
}

}